//---------------------------------------------------------------------------
// <copyright file="RibbonLabel.cs" company="Microsoft Corporation">
//     Copyright (C) Microsoft Corporation.  All rights reserved.
// </copyright>
//---------------------------------------------------------------------------

namespace Microsoft.Windows.Controls.Ribbon
{
    using System;
    using System.Windows;
    using System.Windows.Controls;

    /// <summary>
    ///   A Label which implements IRibbonControl so that it can be placed in the Ribbon.
    /// </summary>
    public class RibbonLabel : Label, IRibbonControl
    {
        /// <summary>
        ///   Initializes static members of the RibbonLabel class.  It also overrides the
        ///   default style and allows ToolTips to be displayed even if the control is disabled.
        /// </summary>
        static RibbonLabel()
        {
            Type ownerType = typeof(RibbonLabel);

            DefaultStyleKeyProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(ownerType));
            ToolTipService.ShowOnDisabledProperty.OverrideMetadata(ownerType, new FrameworkPropertyMetadata(true));
        }
    }
}